#encoding: utf-8

class Editor::Api::BaseController < ApplicationController

  def initialize
  end
  
  def items
    return []
  end
  
  def index
    render json: {
      items: self.items(request.query_parameters())
    }
  end
  
  def create
    data = ActiveSupport::JSON.decode(request.body)
    render json: item_create(data)
  end
  
  def show
    render json: item(params[:id], params)
  end

end
